Object of event handlers for form actions.

<div class="definition">
    Object, default = {}
</div>

When you define HTML template for the form, you can add buttons. If you add name attribute to the button it will be associated with
the same action in the form. The HTML code below shows how to define buttons properly:

<textarea class="html">
<div class="w2ui-page page-0">
    ...form fields ...
</div>

<div class="w2ui-buttons">
    <input type="button" value="Reset" name="reset"/>
    <input type="button" value="Save" name="save"/>
</div>
</textarea>

Now for each button you can define an action in the form

<textarea class="javascript">
let form = new w2form({
    name     : 'form',
    url      : 'server/post',
    record: {
        field_1 : 1,
        field_2 : 2
    },
    fields: [
        { field: 'field_1', type: 'text', required: true },
        { field: 'field_2', type: 'alphanumeric', required: true }
    ],
    actions: {
        reset() {
            this.clear();
        },
        save() {
            this.save();
        },
        custom: {
            text: 'Button Name',
            style: 'color: red',
            class: 'custom-class',
            onClick(event) {
                console.log('Custom button clicked', event)
            }
        }
    }
});
</textarea>

Please note that the name of the action must match the name of the button (case-sensitive).
<div style="height: 10px;"></div>

An action can be either a function as shown above or an object with the following properties:

<textarea class="javascript">
{
    text : '',          // caption of the button
    style : '',         // style of the button
    class : '',         // class of the button
    onClick: null,      // click event handler of the button
}
</textarea>
<div style="height: 10px;"></div>

If you want to execute an action, you can call <a class="argument" href="w2form.action">.action()</a> method. There is also
<a class="argument" href="w2form.onAction">.onAction</a> event that gets triggered each time action is executed.